const mongoose = require('mongoose');

const userSchema = new mongoose.Schema({
  username: {},
  password: {},
  token: {},
  info: {
    nick: {},
    avator: {},
    status: {},
    lastLoginIp: {},
    lastLoginTime: {},
    creatorId: {},
    createTime: {},
    deleted: {},
    menuList: [],
    role: {
      id: {},
      username: {},
      status: {},
      actionList: {},
      deleted: {},
      permissions: [],
    }
  },
  //菜单
  name: {},
  parentId: {},
  id: {},
  meta: {
    icon: {},
    title: {},
    show: {},
  },
  component: {},
  redirect: {},
}, {
  timestamps: true,
})
module.exports = mongoose.model('user', userSchema);